<template>
	<view class="content">
		<view style="height: 30rpx;"></view>
		<view class="wid80 mar">
			<view class="fowe800 foSi35">账号信息</view>
			<view class="dis disAl hei60 mar-top30">
				<view class="fowe600 foSi30" style="width: 30%;">账号名称</view>
				<view class="foSi25" style="width: 70%;color: #A3A3A3;">{{agent_info.mobile}}</view>
				<!-- <view style="width: 70%;">
					<input class="foSi25" style="color: #A3A3A3;" v-model="nickname" placeholder="请输入账号名称"/>
				</view> -->
			</view>
			<!-- <view class="dis disAl hei60 mar-top20">
				<view class="fowe600 foSi30" style="width: 30%;">账号密码</view>
				<view class="dis disAl disJuB foSi25" style="width: 70%;color: #A3A3A3;">
					<view class="foSi25" style="width: 70%;color: #A3A3A3;">******</view>
					<input class="foSi25 wid85" style="color: #A3A3A3;" v-model="password" password placeholder="请输入账号密码"/>
					<view class="foSi20">修改密码</view>
				</view>
			</view> -->
			<view class="dis disAl hei60 mar-top20">
				<view class="fowe600 foSi30" style="width: 30%;">真实姓名</view>
				<view class="foSi25" style="width: 70%;color: #A3A3A3;">{{agent_info.agent.full_name}}</view>
			</view>
			<view class="dis disAl hei60 mar-top20">
				<view class="fowe600 foSi30" style="width: 30%;">当前等级</view>
				<view class="foSi25" style="width: 70%;color: #A3A3A3;">{{agent_info.agent.level_text}}（{{agent_info.agent.cityname}}）</view>
			</view>
			<view class="dis disAl hei60 mar-top20">
				<view class="fowe600 foSi30" style="width: 30%;">关联上级</view>
				<view class="foSi25" style="width: 70%;color: #A3A3A3;">{{agent_info.agent.topagent}}</view>
			</view>
			<view class="dis disAl hei60 mar-top20">
				<view class="fowe600 foSi30" style="width: 30%;">关联下级</view>
				<view class="foSi25" style="width: 70%;color: #A3A3A3;">{{agent_info.agent.subagent}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				url: this.global.url,
				agent_info:{}, // 代理商信息
			}
		},
	
		
		onLoad() {
			this.get_agent_info()
			
		},
		methods: {
			
			
			get_agent_info(){
				let that = this
				uni.showLoading({
					title:'加载中...'
				})
				uni.request({
					url: that.global.url + 'api/qianyu_smfw/agent/index',
					method: "POST",
					header: {
						'site-id': that.global.site_id, //自定义请求头信息
						'token': uni.getStorageSync('token')
					},
					data: {
						agent_id:uni.getStorageSync('agent_id')
					},
					success(res) {
						let result = res.data
						console.log(result.data)
						if (result.code == 1) {
							that.agent_info = result.data
						} else {
							uni.showToast({
								title: result.msg,
								//将值设置为 success 或者直接不用写icon这个参数
								icon: 'error',
								//显示持续时间为 2秒
								duration: 2000
							})
						}
					},complete() {
						uni.hideLoading()
					}
				})
			},
		}
	}
</script>

<style>
	.content {
		min-height: 100vh;
	}
</style>
